use ClientPlatform
var cursor=db.CriteriaLevel3.find({Name:{$in:["Ticker", "Exchange", "ISIN", "Sedol", "CUSIP"]}});
var arr=[];
cursor.forEach(function(doc)
{
    arr.push(doc);
}
);


var newCriteriaLevel2Id=new BinData(3, "wKaNi44EvUxlEBsgGOXubw==");
db.OldTemplateCriteria.find({Name:{$in:["Ticker", "Exchange", "ISIN", "Sedol", "CUSIP"]}}).forEach(function(doc)
{
    doc.CriteriaLevel2Id=newCriteriaLevel2Id;
    db.OldTemplateCriteria.save(doc);
});

//use ClientDW_A
var arrCreate=[];
for(var i=0; i<arr.length; i++)
{
    var curr=arr[i];
    var identifiervalue=0;
    if(curr.Name==='Ticker'){
        identifiervalue='Ticker';
    }
    if(curr.Name==='Exchange'){
        identifiervalue='Exchange';
    }
    if(curr.Name==='ISIN'){
        identifiervalue='8334';
    }
    if(curr.Name==='Sedol'){
        identifiervalue='8335';
    }
    if(curr.Name==='CUSIP'){
        identifiervalue='8333';
    }
  var obj={_id:curr._id, IdentifierTypeId:identifiervalue,IdentifierTypeValue:curr.Name,LastTimeUpdate:ISODate("2015-10-01T12:48:59.264Z")};
  printjson(obj);
  arrCreate.push(obj);
}
//arrCreate.length
use ClientDW_A
db.CorporateIdentifierType.insert(arrCreate);
use ClientDW_B
db.CorporateIdentifierType.insert(arrCreate);

use ClientPlatform